from typing import Optional

from sqlmodel.ext.asyncio.session import AsyncSession

from app.models.system import SysRole


async def get_dept_by_id(session: AsyncSession, dept_id: int) -> Optional[SysRole]:
    """
    根据部门ID查询部门信息
    """
    return await session.get(SysRole, dept_id)
